package cn.myschool.java79.test;

import cn.myschool.java79.dao.SubjectMapper;
import cn.myschool.java79.entity.Subject;
import cn.myschool.java79.util.MybatisUtil;
import org.apache.ibatis.session.SqlSession;

/**
 * @author oldliu
 * @since 1.0
 */
public class DelSubject {
    public static void main(String[] args) {
        SqlSession s= MybatisUtil.get();

        try {
            SubjectMapper mapper = s.getMapper(SubjectMapper.class);
            int add = mapper.del(57L);
            System.out.println("删除了" + add + "门新课");
        }finally {
            MybatisUtil.close(s);
        }

    }
}
